<?php

/**
 * Application bootstrap
 *
 * @uses    Zend_Application_Bootstrap_Bootstrap
 * @package QuickStart
 */
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    /**
     * Bootstrap autoloader for application resources
     *
     * @return Zend_Application_Module_Autoloader
     */
    protected function _initAutoload()
    {
        $view = new Zend_View();
        $view->addHelperPath('ZendX/JQuery/View/Helper/', 'ZendX_JQuery_View_Helper');

        $autoloader = new Zend_Application_Module_Autoloader(array(
            'namespace' => 'Default',
            'basePath'  => dirname(__FILE__),
            //'basePath'  => APPLICATION_PATH,
        ));
        return $autoloader;
    }
    
    protected function _initLocale()
    {
        $locale = new Zend_Locale('lv_LV');
        Zend_Registry::set('Zend_Locale', $locale);

        /*
        $localeFormat = new Zend_Locale_Format();
        $localeFormat->setOptions(
            array(
                'date_format' => 'yyyy-MM-dd',
                'fix_date' => true,
                'locale' => $locale
            )
        );
        Zend_Registry::set('Zend_Locale_Format', $localeFormat);
        */
    }

    /**
     * Bootstrap the view doctype
     *
     * @return void
     */
    protected function _initDoctype()
    {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        $view->doctype('XHTML1_STRICT');
        $view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
    }
}